﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Renci.iRods.Common;

namespace Renci.iRods.Data
{
    public class RuleExecution : DataItem
    {
        [iRodsColumn(DataObjectAttributes.COL_RULE_EXEC_ID)]
        public long ID { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_EXEC_NAME)]
        public string Name { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_EXEC_REI_FILE_PATH)]
        public string FilePath { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_EXEC_USER_NAME)]
        public string UserName { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_EXEC_ADDRESS)]
        public string Address { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_EXEC_TIME)]
        public DateTime Time { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_EXEC_FREQUENCY)]
        public string Frequency { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_EXEC_PRIORITY)]
        public string Priority { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_EXEC_ESTIMATED_EXE_TIME)]
        public DateTime EstimatedExecutionTime { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_EXEC_NOTIFICATION_ADDR)]
        public string NotificationAddress { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_EXEC_LAST_EXE_TIME)]
        public DateTime LastExecutionTime { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_EXEC_STATUS)]
        public string ExecutionStatus { get; internal set; }

        internal RuleExecution(IRodsConnection connection)
            : base(connection)
        {

        }
    }
}
